#include <iostream>

using namespace std;



class A
{
public:
	A(int a = 0)
	{
		this->a = a;
		cout <<"Constructors ------"<<a<<endl;
		

	}

	~A()
	{
		cout <<"Destructor ------"<<a<<endl;
	}


	void printc()
	{
		cout<<"a = "<<a<<endl;
	}
	
	protected:
	int a;
};

class B:public A
{
public:
	B(int t = 1):A(t)
	{
		//a = 9 ;
		b = 9;

	}

	~B()
	{
		cout <<"Destructor ------"<<b<<endl;
	}


	void printcc()
	{
		cout<<"b = "<<b<<endl;
		cout<<"a = "<<A::a<<endl;
	}

	protected:
	int b;
	int a;
};


void fun01()
{
	B b(3);

	b.printc();
	b.printcc();
}
int main(int argc, char* argv[])
{

	cout <<argv[0]<<endl;
	
	fun01();

	system("pause");
	return 0;
}